The CxPntEditor object contains the following methods:
The Configure method launches a Point Service Definitions dialog box, which is used to configure attribute definitions and Config Bit states. See Setting Default Point Configuration for more information.
Configure() As Integer
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 1 | Close button was pressed. |
Example
The following example launches a Point Service Definitions dialog box.
|
Sub Dim iRet iRet= PntEditor.Configure MsgBox iRet End Sub |
The Connect method connects to a PNT.
Connect(DomainSiteService As String)
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. A domain is optional. The service must be a valid PNT. |
Example
The following example creates and connects the CxPntEditor object.
|
Sub Dim PntEditor Set PntEditor = CreateObject("CxEditors.CxPntEditor") PntEditor.Connect("[5410]CYGDEMO.PNT") End Sub |
The Copy method launches a New Point property sheet initialized with the information in the specified record.
Copy(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to copy The point tag can be in one of the following forms:
|
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Point property sheet for point "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.Copy("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The CopyPoints method copies a set of points to a new facility ID.
CopyPoints(destSiteService As String, siteSelected As String, serviceSelected As String, facilitySelected As String, newSite As String, newService As String, newFacility As String, shortIdMask As String, longIdMask As String, vbTestOnly As Variant, SelectedPoints As Variant, ExceptionArray As Variant) As Integer
| Parameter | Required | Description |
|---|---|---|
|
destSiteService |
Yes |
The PNT Site.Service to which to copy the resolved set of points |
|
siteSelected |
Yes |
The associated site of the set of points to copy |
|
serviceSelected |
Yes |
The associated service of the set of points to copy |
|
facilitySelected |
Yes |
The facility ID of the set of points to copy |
|
newSite |
Yes |
The new associated site of the copied points |
|
newService |
Yes |
The new associated service of the copied points |
|
newFacility |
Yes |
The new facility ID of the copied points |
|
shortIdMask |
Yes |
A mask specifying the short point IDs of the new points The mask may consist of the following semicolon-delimited specifiers:
Example A valid short point ID mask is: "NEW";P(4,4); This mask creates a new Point ID by appending the word "NEW" to the beginning of the last four digits of the existing short point ID. That means a point copied from a point with Point ID 00001383 results in a new Point ID value of NEW1383. |
|
longIdMask |
Yes |
A mask specifying the long point IDs of the new points. The mask may consist of the same specifiers listed in the above description of the shortIdMask parameter. |
|
vbTestOnly |
Yes |
Set this parameter to True to test for errors without actually copying points. |
|
SelectedPoints |
Yes |
This parameter is not used by this method. |
|
ExceptionArray |
Yes |
The array of errors returned by this method. |
This method returns a -1 if destSiteService is invalid, or if the user does not have PNT ADD access for this service. Otherwise, it returns a 0.
Example
The following example launches copies points for facility CYGDEMO.UIS::20190303 to facility CYGDEMO.UIS::20190614.
|
Sub Dim iRet, aryEmpty, aryExceptions, strLongIdMask strLongIdMask = "F(0,20);" + Chr(34) + "_" + Chr(34) + ";U(0,10);" iRet= PntEditor.CopyPoints("CYGDEMO.PNT", "CYGDEMO", "UIS", "20190303", _"CYGDEMO", "UIS", "20190614", "A;", strLongIdMask, False, aryEmpty, aryExceptions) Dim i, j, strMsg, bErr bErr = False For i = 0 To UBound(aryExceptions, 1) bErr = True strMsg = strMsg + aryExceptions(i, 0) + ": " For j = 1 To UBound(aryExceptions, 2) strMsg = strMsg + aryExceptions(i, j) + vbCr Next strMsg = strMsg + vbCr Next
If Not(bErr) And Not(iRet) Then strMsg = "Point(s) copied successfully" ElseIf Not(bErr) And iRet = -1 Then strMsg = "Error with destination Site.Service: " strMsg = strMsg + "Make sure you have PNT ADD access, " strMsg = strMsg + "and that the Site.Service is a valid PNT service." End If MsgBox strMsg End Sub |
The CopyPointsUI method launches a Facility Point Copy dialog box.
CopyPointsUI(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to copy. The point tag can be in one of the following forms:
|
This method returns a zero when the dialog box is closed.
Example
The following example launches a Facility Point Copy dialog box for point "CYGDEMO.UIS.00001388."
|
Sub Dim iKey iKey = PntEditor.Find("CYGDEMO.UIS.00001388") PntEditor.CopyPointsUI(iKey) End Sub |
The Delete method launches a Delete Point property sheet initialized with the information in the specified record.
Delete(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to delete. The point tag can be in one of the following forms:
|
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a Delete Point property sheet for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.Delete("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The Disconnect method disconnects from the connected PNT service.
Disconnect()
Example
The following example disconnects the PntEditor object.
|
Sub PntEditor.Disconnect End Sub |
The Edit method launches a property sheet for the specified record.
Edit(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to edit. The point tag can be in one of the following forms:
|
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
dialog box closed successfully. |
Example
The following example launches a property sheet for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.Edit("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The EditAlarmSettings method launches an Alarm Settings dialog box for the specified record.
EditAlarmSettings(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to edit. The point tag can be in one of the following forms:
|
This method returns a 0 when the dialog box is closed.
Example
The following example launches an Alarm Settings dialog box for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.EditAlarmSettings("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The EditAlarmSuppression method launches an Alarm Suppression Settings dialog box for the specified record.
EditAlarmSuppression(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to edit. The point tag can be in one of the following forms:
|
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches an Alarm Suppression Settings dialog box for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.EditAlarmSuppression("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The EditComment method launches a Point Comment dialog box for the specified record.
EditComment(TagOrQueueKey As String, Edit As Boolean) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to edit. The point tag can be in one of the following forms:
|
|
Edit |
No |
Set this parameter to True in order to allow editing of the point comment. If this parameter is not specified, it will default to False. |
This method returns a 1 when the dialog box is closed.
Example
The following example launches a Point Comment dialog box for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.EditComment("CYGDEMO.UIS.00001388", True) MsgBox iRet End Sub |
The EditPointConfig method launches a property sheet for the specified record.
EditPointConfig(TagOrQueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag or database queue key of the record to edit. The point tag can be in one of the following forms:
|
This method returns a 1 when the dialog box is closed.
Example
The following example launches a property sheet for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.EditPointConfig("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The EditQuestionableState method launches an Edit Questionable State dialog box for the specified record.
EditQuestionableState(Tag As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
TagOrQueueKey |
Yes |
The point tag of the record to edit. The point tag can be in one of the following forms:
|
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches an Edit Questionable State dialog box for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.EditQuestionableState("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The Find method returns the database queue key for a specified point tag.
Find(Tag As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
Tag |
Yes |
The point tag for which to return a database queue key. The point tag can be in one of the following forms:
|
Example
The following example displays the database queue key for point "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.Find("CYGDEMO.UIS.00001388") MsgBox iRet End Sub |
The New method launches a New Point property sheet.
New() As Integer
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Point property sheet.
|
Sub Dim iRet iRet= PntEditor.New MsgBox iRet End Sub |
The View method launches a property sheet for the specified record.
View(Key As String, EditEnabled As Boolean) As Integer
| Parameter | Required | Description |
|---|---|---|
|
Key |
Yes |
The point tag or database queue key of the record to view. The point tag can be in one of the following forms:
|
|
EditEnabled |
Yes |
Set to true to enable editing of the property sheet. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
dialog box closed successfully. |
Example
The following example launches a property sheet for record "CYGDEMO.UIS.00001388."
|
Sub Dim iRet iRet= PntEditor.View("CYGDEMO.UIS.00001388", True) MsgBox iRet End Sub |